package com.unionpay.tool;

import java.io.InputStreamReader;
import java.io.LineNumberReader;

import com.unionpay.main.FindLastApk;

public class Shell {
	public static String execute(String cmd) {
		FindLastApk.print("cmd: " + cmd);
		try {
			Process process = Runtime.getRuntime().exec(cmd);
			InputStreamReader isr = new InputStreamReader(process.getInputStream());
			LineNumberReader lnr = new LineNumberReader(isr);
			return lnr.readLine();
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
